import express from 'express';
import loginRouter from './components/login-router.js';
import userRouter from './components/user-router.js';
import residentRouter from './components/resident-router.js'
import inspectorRouter from './components/inspector-router.js'
import communityRouter from './components/community-router.js';
import taskRouter from './components/task-router.js';
import fileUpload from './components/file-upload.js';
import equipmentRouter from './components/equipment-router.js';
import equipmentImgRouter from './components/equipment-img-route.js';
import roleRouter from './components/role-R.js';
import routeRouter from './components/route-R.js';
import role_routeRouter from './components/role_route-R.js';
import eventRouter from './components/quickevent-R.js';

/**
 * 配置服务器路由（接口）
 */
const router = express.Router();

// 服务器测试
router.get('/', (req, res) => {res.send("服务启动!");});
// 引入登录管理路由
loginRouter(router);
// 引入用户路由
userRouter(router);
// 引入社区居民路由
residentRouter(router);
// 引入检查员路由
inspectorRouter(router);
// 引入社区路由
communityRouter(router);
// 引入任务路由
taskRouter(router);
// 引入设备表路由
equipmentRouter(router);
// 引入设备表图片路由
equipmentImgRouter(router);
// 引入角色路由
roleRouter(router);
// 引入路由存储路由
routeRouter(router);
// 引入路由组路由
role_routeRouter(router);
// 引入突发事件路由
eventRouter(router);
// 引入文件处理路由
fileUpload(router);
// 导出路由
export default router;